home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / SLOWRUNS.ZIP / SLOWSRC.ZIP / MAGIC6.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-11  |  3.1 KB  |  111 lines

  1. #define SOUND_STOPPED            0    // no sound is playing
  2. #define SOUND_PLAYING            1    // a sound is playing
  3.  
  4. // return values for the midi sequence status function
  5.  
  6. #define SEQUENCE_STOPPED        0    // the current sequence is stopped
  7. #define SEQUENCE_PLAYING        1    // the current sequence is playing
  8. #define SEQUENCE_COMPLETE        2    // the current sequence has completed
  9. #define SEQUENCE_UNAVAILABLE    0    // this sequence is unavailable
  10.  
  11. // these return values are used to determine what happened when a midi file
  12. // has been registered
  13.  
  14. #define XMIDI_UNREGISTERED         0    // the midi file couldn't be registered at all
  15. #define XMIDI_BUFFERED            1    // the midi file was registered and buffered
  16. #define XMIDI_UNBUFFERED        2    // the midi file was registered, but was too
  17.                                     // big to be buffered, hence, the caller
  18.                                     // needs to keep the midi data resident
  19.                                     // in memory
  20.  
  21. extern int DigPakLoaded;
  22. extern int DigPakInit;
  23. extern unsigned char far *DigPakAddr;
  24. extern unsigned int DigPakParaSeg;
  25. extern int MidPakLoaded;
  26. extern int MidPakInit;
  27. extern unsigned char far *MidPakAddr;
  28. extern unsigned int MidPakParaSeg;
  29. extern unsigned char far *AdvAddr;
  30. extern unsigned int AdvParaSeg;
  31. extern unsigned char far *AdAddr;
  32.  
  33.  
  34. // the DIGPAK sound structure
  35.  
  36. typedef struct SNDSTRUC_typ
  37. {
  38.     unsigned char far *sound;    // a pointer to the raw sound data
  39.     unsigned short sndlen;        // the length of the sound data in bytes
  40.     short far *IsPlaying;        // a pointer to a variable that will be
  41.                                 // used to hold the status of a playing
  42.                                 // sound
  43.     short frequency;            // the frequency in hertz that the
  44.                                 // sound should be played at
  45. } SNDSTRUC, *SNDSTRUC_PTR;
  46.  
  47. // our high level sound structure
  48.  
  49. typedef struct sound_typ
  50. {
  51.     unsigned char far *buffer;    // pointer to the start of VOC file
  52.     short status;                // the current status of the sound
  53.     SNDSTRUC SS;                // the DIGPAK sound structure
  54. } sound, *sound_ptr;
  55.  
  56. // this holds a midi file
  57.  
  58. typedef struct music_typ
  59. {
  60.     unsigned char far *buffer;            // a pointer to midi data
  61.     long size;                            // size of midi file in bytes
  62.     int status;                            // status of song
  63.     int register_info;                    // return value of RegisterXmidiFile
  64. } music, *music_ptr;
  65.  
  66. int Sound_Load(char *filename, sound_ptr the_sound, int translate);
  67.  
  68. void Sound_Translate(sound_ptr the_sound);
  69.  
  70. void Sound_Unload(sound_ptr the_sound);
  71.  
  72. void Sound_Play(sound_ptr the_sound);
  73.  
  74. int Sound_Status(void);
  75.  
  76. void Sound_Stop(void);
  77.  
  78. int Music_Load(char *filename, music_ptr the_music);
  79.  
  80. int Music_Register(music_ptr the_music);
  81.  
  82. void Music_Unload(music_ptr the_music);
  83.  
  84. int Music_Play(music_ptr the_music, int sequence);
  85.  
  86. void Music_Stop(void);
  87.  
  88. void Music_Resume(void);
  89.  
  90. int Music_Status(void);
  91.  
  92. int Load_Sound_Driver_File(char *Filename, unsigned char far *(*Addr), unsigned int *Para, long *Len);
  93.  
  94. int Load_DigPak(char *Filename);
  95.  
  96. int Init_DigPak(void);
  97.  
  98. int DeInit_DigPak(void);
  99.  
  100. void UnLoad_DigPak(void);
  101.  
  102. void Unload_DigPak(void);
  103.  
  104. int Load_MidPak(char *Filename, char *AdvFilename, char *AdFilename);
  105.  
  106. int Init_MidPak(void);
  107.  
  108. void DeInit_Midpak(void);
  109.  
  110. void UnLoad_MidPak(void);
  111.